import java.util.Scanner;
public class Example3_1 {
    public static void main(String[] args){
        System.out.println("请输入一个年份：");
        Scanner reader = new Scanner(System.in);
        int year = reader.nextInt();
        if(year <= 1000 || year >= 10000){
            System.out.println("这不是一个正确的年份");
        }
        else{
            if(year % 4 == 0 ||
                    (year % 400 == 0 && year %100 == 0)){
                System.out.printf("%d是闰年。",year);
            }
            else{
                System.out.printf("%d不是闰年。",year);
        }
        }
    }
}
